home *** CD-ROM | disk | FTP | other *** search
/ CD Fun House 8 / CD Funhouse Version 8.0 - Wayzata Technology (7013) (1993).iso / pc / mac / __the_sc / hypersta.rs / background_2700.txt < prev    next >
Text File  |  1990-10-07  |  2KB  |  122 lines

  1. -- background: 2700 from stack: in.rs
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on setupCard
  8.   global theGuess
  9.   put theGuess into background field "Guess"
  10.   play "Chimes"
  11.   tabKey
  12. end setupCard
  13.  
  14.  
  15. -- part 2 (field)
  16. -- low flags: 00
  17. -- high flags: 0002
  18. -- rect: left=390 top=300 right=319 bottom=432
  19. -- title width / last selected line: 0
  20. -- icon id / first selected line: 0 / 0
  21. -- text alignment: 0
  22. -- font id: 3
  23. -- text size: 14
  24. -- style flags: 0
  25. -- line height: 18
  26. -- part name: guess
  27. ----- HyperTalk script -----
  28. on returnKey
  29.   send mouseUp to background button "OK"
  30. end returnKey
  31.  
  32.  
  33.  
  34. -- part 3 (button)
  35. -- low flags: 00
  36. -- high flags: 8003
  37. -- rect: left=437 top=294 right=327 bottom=474
  38. -- title width / last selected line: 0
  39. -- icon id / first selected line: 0 / 0
  40. -- text alignment: 1
  41. -- font id: 0
  42. -- text size: 12
  43. -- style flags: 0
  44. -- line height: 16
  45. -- part name: OK
  46. ----- HyperTalk script -----
  47. on mouseUp
  48.   global theNumber
  49.   global guesses
  50.   global theGuess
  51.   visual effect dissolve to black
  52.   put background field "Guess" into theGuess
  53.   if theGuess < 1 or theGuess >100 then
  54.     beep
  55.     answer "You must guess a number from 1 to 100!"
  56.     tabKey
  57.     exit mouseUp
  58.   end if
  59.   if theGuess is theNumber then
  60.     go to card "You Win"
  61.     exit mouseUp
  62.   end if
  63.   if guesses is 1 then
  64.     go to card "You Lose"
  65.     exit mouseUp
  66.   end if
  67.   subtract 1 from guesses
  68.   put abs (theGuess-theNumber) into howMany
  69.   if howMany>=64 then
  70.     go to card "Stars 1"
  71.     setupCard
  72.     exit mouseUp
  73.   end if
  74.   if howMany>=32 then
  75.     go to card "Stars 2"
  76.     setupCard
  77.     exit mouseUp
  78.   end if
  79.   if howMany>=16 then
  80.     go to card "Stars 3"
  81.     setupCard
  82.     exit mouseUp
  83.   end if
  84.   if howMany>=8 then
  85.     go to card "Stars 4"
  86.     setupCard
  87.     exit mouseUp
  88.   end if
  89.   if howMany>=4 then
  90.     go to card "Stars 5"
  91.     setupCard
  92.     exit mouseUp
  93.   end if
  94.   if howMany>=2 then
  95.     go to card "Stars 6"
  96.     setupCard
  97.     exit mouseUp
  98.   end if
  99.   go to card "Stars 7"
  100.   setupCard
  101. end mouseUp
  102.  
  103.  
  104. -- part 4 (button)
  105. -- low flags: 00
  106. -- high flags: 0000
  107. -- rect: left=475 top=2 right=36 bottom=510
  108. -- title width / last selected line: 0
  109. -- icon id / first selected line: 0 / 0
  110. -- text alignment: 1
  111. -- font id: 0
  112. -- text size: 12
  113. -- style flags: 0
  114. -- line height: 16
  115. -- part name: 
  116. ----- HyperTalk script -----
  117. on mouseUp
  118.   visual effect iris close
  119.   go home
  120. end mouseUp
  121.  
  122.